package com.social.service.emergencyContact.impl;

import com.social.entity.EmergencyContact;
import com.social.entity.TrainExperience;
import com.social.mapper.EmergencyContactMapper;
import com.social.mapper.TrainExperienceMapper;
import com.social.service.emergencyContact.EmergencyContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "emergencyContactService")
public class EmergencyContactServiceImpl implements EmergencyContactService {

    @Autowired
    private EmergencyContactMapper emergencyContactMapper;
    @Override
    public int addEmergencyContact(EmergencyContact emergencyContact) {
        return emergencyContactMapper.insertSelective(emergencyContact);
    }
    @Override
    public List<EmergencyContact> selectByHouseKeeperId(String id) {
        return emergencyContactMapper.selectByHouseKeeperId(id);
    }

    @Override
    public int deleteByHouseKeeperId(String houseKeeperId) {
        return emergencyContactMapper.deleteByHouseKeeperId(houseKeeperId);
    }
}
